<form id="J_loginCommand" action="/security/register" method="post">
			<div class="mod_dialog_login mod_dialog_common">
            <h2 class="title">成为我们的一员</h2>
            <div class="loginbox">
                <ul class="mod_form input_long_per">
                	<li class="control-group">
                    	<label class="item_l" for="J_registerEmail">邮　箱：</label>
                    	<div class="controls">
                       		<input type="text" name="loginName" id="J_registerLoginName" placeholder="请输入注册邮箱" class="input" />
                       		<span class="m_l_12 f_red" id="J_registerEmail_error"></span>
                            <span id="J_activate" style=display:none></font></a></span>
                            <span id="J_forget" style=display:none>该邮箱已注册,<a target="_blank" href="/help/forget_pass_account/" ><font color='red'>忘记密码</font></a></span>
                        </div>
                    </li>
                    <li class="control-group">
                        <label class="item_l" for="J_enterEmail">密　码：</label>
                        <div class="controls">
                            <input type="password" name="password" id="J_registerPassword" placeholder="请输入创建密码" class="input">
                            <span class="m_l_12 f_red" id="J_enterPass_error"></span>
                        </div>
                    </li>
                    <li class="control-group">
                        <label class="item_l" for="J_enterEmail">呢　称：</label>
                        <div class="controls">
                            <input type="text" id="J_registerNickname" name="nickName" placeholder="请输入呢称" class="input">
                             <span class="m_l_12 f_red" id="J_userDetailsNickname_error"></span>
                        </div>
                    </li>
                    <li class="control-group control-error">
		                <label class="item_l" for="J_code_query">验证码：</label>
		                <div class="controls" id="verifyField">
		                </div>
    				</li>
    				<li class="agree" style="padding:0 0 0 65px;">
                        <label for="J_agree" class="agree_in">
                            <input type="checkbox" name="" id="J_agree" checked="checked" />我已阅读并同意
                            <a href="/help/protocol" target="_blank">&lt;&lt;KIMOJI用户服务条款&gt;&gt;</a>
                        </label>
                    </li>
                    <li class="control-btn" style="padding:20px 0 95px 65px;">
                        <label class="item_l" for=""></label>
                        <div class="controls">
                            <a class="btn btn-red btn-padding-short" onclick="releaseRegister();" id="J_register">立即注册</a>  <a href="/login" data-target="#J_base_login_dialog" data-toggle="modal" data-width="620"><span class="f_hui m_l_12"></span><span class="f_red_light">已有账户?</span></a>
                        </div>
                    </li>
                 </ul>
	        </div>
	    </div>
	</form>
	
<script type="text/javascript">
Recaptcha.create("6LdeBOwSAAAAACrIFhl8NMir8IWZNF4XpIL--Brc",
    "verifyField",
    {
      theme: "clean",
      callback: Recaptcha.focus_response_field
    }
  );

function releaseRegister(){
	$.ajax({
             type: "post",
             url: "/security/register",
             dataType: "json",
             data:{loginName:$("#J_registerLoginName").val(),password:$("#J_registerPassword").val(),nickName:$("#J_registerNickname").val(),verifyCode:$("#J_registerVerifyCode").val(),recaptcha_challenge_field:$("#recaptcha_challenge_field").val(),recaptcha_response_field:$("#recaptcha_response_field").val()},
             async: true,
             success: function(data){
         		if(data.success==true){
	   			$("#J_baseIsLogin").val(1);
	   			$("#J_header_login_li").hide();
	   			$("#J_header_register_li").hide();
	   			$("#J_header_message_li").show();
	   			$("#J_header_user_photo_li").show();
	   			var userHeadImage = data.object.headImage;
	   			var userNickName = data.object.nickName;
	   			if(userHeadImage==null || userHeadImage=='')
	   			{
	   				userHeadImage='http://static.aceona.com/V3/assets/img/head_30.jpg';
	   			}else{
	   				userHeadImage=userHeadImage+"_1";
	   			}
	   			
	   			$("#J_user_header_image").attr("src",userHeadImage);
	   			$("#J_user_header_image").attr("alt",userNickName);
	 			$("#J_base_login_dialog").modal('hide'); 
	 			__AceLoginCallBack(); 
	   		}else{
	   		 	$(data.object).ace_widgets_validate({
                   	errorText:data.message,
                    callback:function(){
		                Recaptcha.reload();
                        $(data.object).focus();
                    }
                });
    			return false;
	   		}
         },
         error: function(){
         }
         
    });
}
</script>